package cn.hbwe.Dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

@Data
public class dRegisterDTO {
    @NotBlank(message = "用户姓名不能为空")
    @Length(max = 20,message = "姓名长度不能超过20")
    private String doctorName;

    @NotBlank(message = "密码不能为空")
    @Min(value = 6,message = "密码太短啦")
    private String doctorPassword;

    @NotNull(message = "账号（个人编号）不能为空")
    @Length(max = 11, message = "账号（个人编号）长度不能超过11位")
    @Length(min = 6,message = "账号（个人编号）长度不能小于6位")
    @Pattern(regexp = "^[0-9]+$",message = "账号（个人编号）只能包含数字")
    private String doctorNo;

    @NotBlank(message = "邮箱不能为空")
    @Length(max = 20, min = 12 ,message = "请输入正确的QQ邮箱")
    @Pattern(regexp="^[1-9][0-9]{4,10}@qq.com$",message="请输入正确的QQ邮箱")
    private String doctorEmail;


    @NotBlank(message = "性别不能为空")
    @Pattern(regexp = "^(男|女){1}$",message="请输入男或女")
    private String doctorSex;

    @NotBlank(message = "专业名称不能为空")
    private  String doctorSpeciality;


    @NotNull(message = "科室ID不能为空")
    private  Integer departmentID;

    @NotNull(message = "价格不能为空")
    private BigDecimal price;

}
